package com.dingreading.cloud.mall.util;

import com.dingreading.cloud.mall.dto.StockOutDeliveryDto;
import com.dingreading.cloud.mall.entity.WhStockOutDelivery;
import com.dingreading.cloud.mall.entity.WhStockOutDeliveryImg;

import java.util.List;

public class PurchaseUtil {

    /**
     * 设置货记录信息
     */
    public static StockOutDeliveryDto getDeliveryObj(WhStockOutDelivery delivery, List<WhStockOutDeliveryImg> imgList) {
        StockOutDeliveryDto data = new StockOutDeliveryDto();
        data.setId(delivery.getId());
        data.setOutCode(delivery.getOutCode());
        data.setExpressName(delivery.getExpressName());
        data.setExpressCode(delivery.getExpressCode());
        data.setExpressPrice(delivery.getExpressPrice());
        data.setExpressPayType(delivery.getExpressPayType());
        data.setExpressTime(delivery.getExpressTime());
        data.setPackageNum(delivery.getPackageNum());
        data.setStockOutMethod(delivery.getStockOutMethod());
        data.setDeliveryWarehouseId(delivery.getDeliveryWarehouseId());
        data.setDeliveryWarehouseName(delivery.getDeliveryWarehouseName());
        data.setStaffName(delivery.getLastStaffName());
        data.setImgList(imgList);
        data.setRemark(delivery.getRemark());
        data.setStatus(delivery.getType());
        return data;
    }

}
